drop table spmi_ods.spmi_piece_bill_refresh_task;
CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_piece_bill_refresh_task(
id                                                 bigint                         COMMENT '主键ID',
task_name                                          String                         COMMENT '任务名',
task_status                                        bigint                         COMMENT '任务状态：0未开始 1进行中 2成功 3失败',
task_end_time                                      timestamp                      COMMENT '任务完成时间',
fee_type                                           bigint                         COMMENT '账单类型：1中转费 2操作费',
data_item_type                                     bigint                         COMMENT '数据项:1寄件网点 2寄件财务中心',
bill_generation_time_start                         timestamp                      COMMENT '账单产生时间(开始时间)',
bill_generation_time_end                           timestamp                      COMMENT '账单产生时间（结束时间）',
create_by                                          bigint                         COMMENT '创建人ID',
create_by_name                                     String                         COMMENT '创建人NAME',
create_by_network_id                               bigint                         COMMENT '创建网点ID',
create_by_network_code                             String                         COMMENT '创建网点CODE',
create_by_network_name                             String                         COMMENT '创建网点NAME',
create_time                                        timestamp                      COMMENT '创建时间',
update_time                                        timestamp                      COMMENT '更新时间',
remark                                             String                         COMMENT '备注'
)
COMMENT '账单刷新任务表'
PARTITIONED BY (dt STRING COMMENT '全量快照表 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_piece_bill_refresh_task'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);